package com.jumlabs.entities.peopleandorganizations;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the organization database table.
 *  @author Otto Giron
 */
@Entity
@PrimaryKeyJoinColumn(name="party_id")
public class Organization extends Party implements Serializable {
	private static final long serialVersionUID = 1L;
	
	private String name;

	@Column(name="parent_id")
	private Long parentId;

	//bi-directional many-to-one association to OrganizationSubtype
	@ManyToOne
	@JoinColumn(name="organization_subtype_id")
	private OrganizationSubtype organizationSubtype;

	public Organization() {
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getParentId() {
		return this.parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public OrganizationSubtype getOrganizationSubtype() {
		return this.organizationSubtype;
	}

	public void setOrganizationSubtype(OrganizationSubtype organizationSubtype) {
		this.organizationSubtype = organizationSubtype;
	}

}